Mobile accessibility testing, as described herein, is a process by which an application is tested for its degree of accessibility to certain users, such as visually challenged users, blind users, deaf users, etc. Different operating systems face different challenges and provide different limitations with respect to accessibility. For example, in connection with the Android system, accessibility labels are not set for user interface (UI) elements. Additionally, Android's Talkback (a screen reader service) and Explore by Touch (a complimentary service to Talkback) features recognize text inside a UI widget and read the text to the user. The Talkback and Explore by Touch features also make some inaccessible elements completely accessible to the user, such as UI elements including TextView and Button. However, for elements such as ImageView, ImageButton, and EditText with or without hints, the Talkback feature fails to make the elements accessible unless the accessibility property is explicitly set.
By way of another example, in connection with the iOS system, accessibility labels are similarly not set for UI elements. iOS' VoiceOver feature recognizes the text inside a UI widget and reads the text to the user. Additionally, the VoiceOver feature makes elements such as UILabel, UIButton, and UITableView that are inaccessible to certain types of users (such as users with one or more sensory impairments) completely accessible to such users. However, for elements such as UIImageView, UIButton with ImageView instead of text, and UITextField with or without placeholder, the VoiceOver feature fails to make the elements accessible unless the accessibility label is explicitly set.
Existing accessibility testing approaches can include providing a Boolean report indicating whether a UI element is accessible or inaccessible. However, some existing approaches include scanning UI layout files, a technique which fails to capture the dynamic behavior of the element during application execution. Additionally, manually fixing inaccessible elements by setting appropriate accessibility properties is tedious and often time-consuming.
Accordingly, a need exists for techniques to automatically fix inaccessible UI widgets of a mobile application.